export const tableOption = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  dialogDirection: "rtl",
  searchMenuSpan: 6,
  labelWidth: 100,
  column: [
    {
      type: "input",
      label: "名称",
      prop: "name",
      rules: [
        {
          required: true,
          message: "请输入名称",
          trigger: "blur",
        },
      ],
    },
    {
      label: "图片",
      prop: "cover",
      type: "upload",
      action: "/fastfile/upload/szgk-1256675456",
      limit: 1,
      listType: "picture-img",
      dataType: "string",
      propsHttp: {
        res: "data",
        url: "kpath",
      },
      span: 24,
      hide: false,
      rules: [
        {
          required: true,
          message: "请选择图片",
          trigger: "change",
        },
      ],
    },
    {
      type: "input",
      label: "项目总占地",
      prop: "fieldone",
      rules: [
        {
          required: true,
          message: "请输入项目总占地",
          trigger: "blur",
        },
      ],
    },
    {
      type: "input",
      label: "总投资",
      prop: "fieldtwo",
      rules: [
        {
          required: true,
          message: "请输入总投资",
          trigger: "blur",
        },
      ],
    },
    // {
    //   type: "map",
    //   label: "地址",
    //   prop: "address",
    //   dataType: "string",
    //   formatter: (data) => {
    //     const str = data.address ? data.address.split(",") : "";
    //     return str[2];
    //   },
    // },
    // {
    //   type: "input",
    //   label: "联系方式",
    //   prop: "phone",
    // },
    {
      type: "input",
      label: "内容",
      prop: "content",
      component: "avueUeditor",
      slot: true,
      hide: true,
      options: {
        action: "/fastfile/upload/szgk-1256675456",
        props: {
          res: "data", // 解析文件上传后的respose.JSON
          url: "kpath", // 解析responseJSON==> data.fileUrl
        },
      },
      span: 24,
      rules: [
        {
          required: true,
          message: "请输入内容",
          trigger: "blur",
        },
      ],
    },
    // {
    //   type: "input",
    //   label: "资源",
    //   prop: "resources",
    //   hide: true,
    //   editDisplay: false,
    //   addDisplay: false,
    // },
  ],
};
